import { defineStore } from "pinia"; 
import{ref } from "vue";

const userInfoStore = defineStore("userInfo", ()=>{
    //定义状态函数
    const info = ref({})

    const setInfo = (data) => {
        info.value = data
    }


    const removeInfo = () => {
        info.value = {}
    }

    return {
        info,
        setInfo,
        removeInfo
    }

},{persist: true})

export default userInfoStore